import http from "../http";

//默认导出
export default {
    //获取分类列表数据的方法名
    select: {
        name: '类目查询',
        url: '/api/category',
        // async 就是异步操作， await 就是等待异步操作完成之后再执行后面的代码
        call: async function (params) { 
            return await http.get(this.url, params);
        }
    },
    insert: {
        name: '类目添加',
        url: '/api/category',
        call: async function (params) { 
            return await http.post(this.url, params)
        }
    },
    delete: {
        name: '类目添加',
        url: '/api/category',
        call: async function (params) {
            return await http.delete(this.url, params)
        }
    },
    update: {
        name: '类目添加',
        url: '/api/category',
        call: async function (params) {
            return await http.put(this.url, params)
        }
    }
}